#!/usr/bin/env bash
# shellcheck disable=SC2034  # Unused variables OK as this script is `source`d.

set -o xtrace
set -o errexit
set -o nounset
set -o pipefail

# Set the default Rust log level to info if unset.
# https://docs.rs/env_logger
export RUST_LOG="${RUST_LOG:-info}"

# See https://pantheon.corp.google.com/artifacts/docker/oak-ci/europe-west2/oak-development?project=oak-ci
readonly DOCKER_IMAGE_NAME='europe-west2-docker.pkg.dev/oak-ci/oak-development/oak-development:latest'

# The difference between Docker image id and image digest is that the image id corresponds to the
# hash of the contents of the image, while the image digest is a hash of the image and its metadata,
# and it is assigned by the specific registry after pushing the image there. Therefore, we should
# mostly rely on the image id locally, though we need to use the image digest when pulling the image
# from a registry first.

# Do not modify manually. This value is automatically updated by ./scripts/docker_build .
readonly DOCKER_IMAGE_ID='sha256:a234cc09ef128f2c75064eb0550c24cfcf7f05af4cbd7f7840181db861dc7fee'

# Do not modify manually. This value is automatically updated by ./scripts/docker_push .
readonly DOCKER_IMAGE_REPO_DIGEST='europe-west2-docker.pkg.dev/oak-ci/oak-development/oak-development@sha256:c1237b21cfd7d8a4028960fe07cce451a2a6b9cb2a31b267e5f107fa6432d2c5'
